package com.apex.security.api.service;

import com.apex.security.api.entity.TBsdtUserEvaluateDao;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 服务相关接口
 */
@RequestMapping
public interface TechnologicalCenterServiceApi {

    /**
     * 查询全部服务
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/list",method = RequestMethod.GET)
    String getAllList();

    /**
     * 根据用户账号，查询与用户身份相关的全部服务
     * @param userID
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/list/userId",method = RequestMethod.GET)
    String getAllListByUserId(@RequestParam("userID") String userID);

    /**
     * 根据服务编号，查询服务详情
     * @param id
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/entity/user",method = RequestMethod.GET)
    String getEntityById(@RequestParam("userID") String userID, @RequestParam("id") Long id);

    /**
     * 根据服务编号，查询服务详情
     * @param id
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/entity",method = RequestMethod.GET)
    String getEntityByIdNoUser(@RequestParam("id") Long id);

    /**
     * 查询全部用户订阅服务
     * @param userID
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/list/dyfw",method = RequestMethod.GET)
    String getAllDyByUserId(@RequestParam("userID") String userID);

    /**
     * 分页查询
     * 查询全部用户订阅服务
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/list/dyfw/pager",method = RequestMethod.POST)
    String getAllPageDyByUserId(@RequestBody String code);


    /**
     * 用户订阅服务
     * @param userID
     * @param id
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/entity/dyfw",method = RequestMethod.GET)
    String updateEntity(@RequestParam("userID") String userID, @RequestParam("id") Long id);

    /**
     * 用户订阅服务
     * @param userID
     * @param id
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/entity/qxdyfw",method = RequestMethod.GET)
    String updateEntityQx(@RequestParam("userID") String userID, @RequestParam("id") Long id);

    /**
     * 用户服务评价
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/entity/fwpj",method = RequestMethod.POST)
    String entityFwpj(@RequestBody TBsdtUserEvaluateDao evaluateDao);

    /**
     * 条件分页查询全部服务（如果没有分页参数，则条件查询全部服务）
     * @param code
     * @return
     */
    @RequestMapping(value = "/rest/api/technological/list/entity",method = RequestMethod.POST)
    String findAllByPager(@RequestBody String code);


    @RequestMapping(value = "/rest/api/technological/list/hot",method = RequestMethod.POST)
    String findAllHotServer(@RequestBody String code);

}
